import Vue from 'vue'
import Router from 'vue-router'

import Index from '../pages/index.vue'
import Home from '../pages/Home.vue'
import About from '../pages/About.vue'

// 上传答题卡
import Scantron from '../pages/scantron'

// 个人中心
import User from '../pages/user.vue'
import Userreport from '../pages/user_report.vue'
import Usersuggestion from '../pages/user_suggestion.vue'

// 评估报告
import Assessment from '../pages/assessment_report.vue'
import Ranklist from '../pages/ranklist.vue'
import Analysis from '../pages/subject_analysis.vue'
import Evaluation from '../pages/evaluation.vue'

Vue.use(Router)

const router = new Router({
  mode: 'history',
  base: process.env.VUE_APP_ROUTERURL,
  routes: [
    {
      path: '/',
      name: 'index',
      component: Index
    },
    {
      path: '/home',
      name: 'home',
      alias: '/index',
      component: Home
    },
    {
      path: '/about',
      name: 'about',
      component: About
    },
    {
      path: '/scantron',
      name: 'scantron',
      component: Scantron
    },
    {
      path: '/user',
      name: 'user',
      component: User
    },
    {
      path: '/user/user_report',
      name: 'user_report',
      component: Userreport
    },
    {
      path: '/user/suggestion',
      name: 'suggestion',
      component: Usersuggestion
    },
    {
      path: '/assessment_report',
      name: 'assessment',
      component: Assessment
    },
    {
      path: '/ranklist',
      name: 'ranklist',
      component: Ranklist
    },
    {
      path: '/subject_analysis',
      name: 'analysis',
      component: Analysis
    },
    {
      path: '/evaluation',
      name: 'evaluation',
      component: Evaluation
    }
  ]
})

export default router
